#!/bin/sh

if [ "${1}" == "-y" ] || [ "${1}" == "--force" ] ; then
	action=${1}
else
	action=""
fi

for i in $(ls -ld /opt/php* | awk '{print $9}' | sed 's:/opt/::g' | tr '\n' ' ') ; do
	if [ "$(readlink /usr/bin/${i}-cli)" == "/opt/${i}/custom/php-cli.sh" ] ; then
		sh /script/phpm-installer $i $action
	fi
done